package cn.cvs.mysingle;

/**
 * 饿汉模式
 *    类加载的时候,实例化对象
 *
 */
public class User2 {

    private static User2 user=new User2();

    private User2() {
    }

    public static synchronized User2 getInstance(){
        return user;
    }

}
